broadway: Remove remaining unused window_update code
authorAlexander Larsson <alexl@redhat.com>
Tue, 21 Nov 2017 18:49:29 +0000 (19:49 +0100)
committerAlexander Larsson <alexl@redhat.com>
Thu, 23 Nov 2017 09:48:29 +0000 (10:48 +0100)
gdk/broadway/broadway-output.c
gdk/broadway/broadway-output.h
gdk/broadway/broadway-protocol.h
gdk/broadway/broadway-server.c
gdk/broadway/broadway-server.h
gdk/broadway/broadway.js
gdk/broadway/broadwayd.c
gdk/broadway/gdkbroadway-server.c
gdk/broadway/gdkbroadway-server.h
gdk/broadway/gdkwindow-broadway.c
gdk/broadway/gdkwindow-broadway.h

index 89326c5994b7039b7131c2374a97452cd65a826a..193d68e3b3b281c3c87481907b89cbe04367c4a9 100644 (file)
@@ -286,17 +286,6 @@ broadway_output_set_transient_for (BroadwayOutput *output,
   append_uint16 (output, parent_id);
 }
 
-void
-broadway_output_window_update (BroadwayOutput *output,
-                              int             id,
-                              guint32         texture)
-{
-  write_header (output, BROADWAY_OP_WINDOW_UPDATE);
-
-  append_uint16 (output, id);
-  append_uint32 (output, texture);
-}
-
 void
 broadway_output_window_set_nodes (BroadwayOutput *output,
                                   int             id,
index eb29c171ac515fcd89e58c7df1d98d68a3e36969..024df8e1ca755ed8b51113e288910b1108965cc6 100644 (file)
@@ -53,9 +53,6 @@ void            broadway_output_move_resize_surface (BroadwayOutput *output,
 void            broadway_output_set_transient_for (BroadwayOutput *output,
                                                   int             id,
                                                   int             parent_id);
-void            broadway_output_window_update   (BroadwayOutput *output,
-                                                int             id,
-                                                guint32         texture);
 void            broadway_output_window_set_nodes (BroadwayOutput *output,
                                                   int             id,
                                                   guint32        *data,
index 7f7a5e9a5f9fe53d65c6e9865c20d3ffc4f057f7..3266330c4b086455ccae05380b24f41aba82c0e8 100644 (file)
@@ -160,7 +160,6 @@ typedef enum {
   BROADWAY_REQUEST_SHOW_WINDOW,
   BROADWAY_REQUEST_HIDE_WINDOW,
   BROADWAY_REQUEST_SET_TRANSIENT_FOR,
-  BROADWAY_REQUEST_UPDATE,
   BROADWAY_REQUEST_MOVE_RESIZE,
   BROADWAY_REQUEST_GRAB_POINTER,
   BROADWAY_REQUEST_UNGRAB_POINTER,
@@ -188,12 +187,6 @@ typedef struct {
   guint32 parent;
 } BroadwayRequestSetTransientFor;
 
-typedef struct {
-  BroadwayRequestBase base;
-  guint32 id;
-  guint32 texture;
-} BroadwayRequestUpdate;
-
 typedef struct {
   BroadwayRequestBase base;
   guint32 id;
@@ -260,7 +253,6 @@ typedef union {
   BroadwayRequestShowWindow show_window;
   BroadwayRequestHideWindow hide_window;
   BroadwayRequestSetTransientFor set_transient_for;
-  BroadwayRequestUpdate update;
   BroadwayRequestMoveResize move_resize;
   BroadwayRequestGrabPointer grab_pointer;
   BroadwayRequestUngrabPointer ungrab_pointer;
index 4aa1b26b9f4905dbc0f5a768df1de9a302216fe1..859fa68c41374f71678750d0686ab85cc4f418c2 100644 (file)
@@ -1518,24 +1518,6 @@ broadway_server_has_client (BroadwayServer *server)
   return server->output != NULL;
 }
 
-void
-broadway_server_window_update (BroadwayServer   *server,
-                               gint              id,
-                               guint32           texture)
-{
-  BroadwayWindow *window;
-
-  window = g_hash_table_lookup (server->id_ht, GINT_TO_POINTER (id));
-  if (window == NULL)
-    return;
-
-  window->texture = texture;
-
-  if (server->output != NULL)
-    broadway_output_window_update (server->output, window->id,
-                                   window->texture);
-}
-
 void
 broadway_server_window_set_nodes (BroadwayServer   *server,
                                   gint              id,
@@ -1803,9 +1785,6 @@ broadway_server_resync_windows (BroadwayServer *server)
         broadway_output_window_set_nodes (server->output, window->id,
                                           window->nodes, window->nodes_len);
 
-      broadway_output_window_update (server->output, window->id,
-                                    window->texture);
-
       if (window->visible)
        broadway_output_show_surface (server->output, window->id);
     }
index 1432a0a934a51cd69f977c810366d65e50de86b6..4bc81a70d2671304ca961e5bdea6f5be9860751b 100644 (file)
@@ -82,9 +82,6 @@ void                broadway_server_release_texture          (BroadwayServer   *
                                                              guint32           id);
 cairo_surface_t   * broadway_server_create_surface           (int               width,
                                                              int               height);
-void                broadway_server_window_update            (BroadwayServer   *server,
-                                                             gint              id,
-                                                             guint32           texture);
 void                broadway_server_window_set_nodes         (BroadwayServer   *server,
                                                              gint              id,
                                                               gint              n_data,
index 6192977056ecb5ebe8334f5e6541b11e207dc422..80bd9df65a3412ccf7e13c9ce5bb5453d3aea8ba 100644 (file)
@@ -291,14 +291,6 @@ function cmdLowerSurface(id)
     restackWindows();
 }
 
-function cmdWindowUpdate(id, texture_id)
-{
-    var surface = surfaces[id];
-    var texture_url = textures[texture_id];
-
-    surface.div.src = texture_url;
-}
-
 function handleNode(parent, node_data, data_pos)
 {
     var type = node_data[data_pos++];
@@ -459,12 +451,6 @@ function handleCommands(cmd)
             cmdLowerSurface(id);
             break;
 
-        case 'b': // Update window
-            id = cmd.get_16();
-            var texture = cmd.get_32();
-            cmdWindowUpdate(id, texture);
-            break;
-
         case 't': // Upload texture
             id = cmd.get_32();
             var data = cmd.get_data();
index b95e8c841ac7224647a85bd6a33576b465e5bf4d..27ceff42f91dcea9e1715a73ca7c340ee00a4582 100644 (file)
@@ -282,13 +282,6 @@ client_handle_request (BroadwayClient *client,
                                                request->set_transient_for.id,
                                                request->set_transient_for.parent);
       break;
-    case BROADWAY_REQUEST_UPDATE:
-      global_id = GPOINTER_TO_INT (g_hash_table_lookup (client->textures,
-                                                       GINT_TO_POINTER (request->update.texture)));
-      broadway_server_window_update (server,
-                                    request->update.id,
-                                    global_id);
-      break;
     case BROADWAY_REQUEST_SET_NODES:
       {
         gsize array_size = request->base.size - sizeof (BroadwayRequestSetNodes) + sizeof(guint32);
index f873a771167b340b1924ff5919068baa73870be5..28959a764ead058d46b89a234eb01e5dfbd74e89 100644 (file)
@@ -552,20 +552,6 @@ _gdk_broadway_server_window_set_transient_for (GdkBroadwayServer *server,
                                    BROADWAY_REQUEST_SET_TRANSIENT_FOR);
 }
 
-void
-_gdk_broadway_server_window_update (GdkBroadwayServer *server,
-                                   gint id,
-                                   guint32 texture)
-{
-  BroadwayRequestUpdate msg;
-
-  msg.id = id;
-  msg.texture = texture;
-
-  gdk_broadway_server_send_message (server, msg,
-                                   BROADWAY_REQUEST_UPDATE);
-}
-
 static int
 open_shared_memory (void)
 {
index f679153b34cdd655641777dbb38ac1ac8a11ab14..8ff26ebcfba1bb47b7e558a2da41768d81cad240 100644 (file)
@@ -63,9 +63,6 @@ guint32             gdk_broadway_server_upload_texture           (GdkBroadwaySer
                                                                   GdkTexture         *texture);
 void                gdk_broadway_server_release_texture          (GdkBroadwayServer  *server,
                                                                   guint32             id);
-void               _gdk_broadway_server_window_update            (GdkBroadwayServer  *server,
-                                                                 gint                id,
-                                                                 guint32             texture);
 void               gdk_broadway_server_window_set_nodes          (GdkBroadwayServer *server,
                                                                   guint32            id,
                                                                   GArray             *nodes);
index f1fe25d799a92b302ee371feb7046a9290a6984a..4b71b45c913d321a18a0eb0203c9eb8f6d2f0c49 100644 (file)
@@ -99,53 +99,12 @@ find_broadway_display (void)
 static void
 update_dirty_windows_and_sync (void)
 {
-  GList *l;
   GdkBroadwayDisplay *display;
-  gboolean updated_surface;
 
   display = GDK_BROADWAY_DISPLAY (find_broadway_display ());
   g_assert (display != NULL);
 
-  updated_surface = FALSE;
-  for (l = display->toplevels; l != NULL; l = l->next)
-    {
-      GdkWindowImplBroadway *impl = l->data;
-
-      if (impl->dirty)
-        {
-          GdkTexture *texture;
-          guint32 texture_id;
-
-          impl->dirty = FALSE;
-          updated_surface = TRUE;
-
-          if (impl->texture_id)
-            gdk_broadway_server_release_texture (display->server, impl->texture_id);
-          impl->texture_id = 0;
-
-          texture = gdk_texture_new_for_surface (impl->surface);
-          texture_id =  gdk_broadway_server_upload_texture (display->server, texture);
-          g_object_unref (texture);
-
-          impl->texture_id = texture_id;
-
-
-          if (impl->node_data)
-            gdk_broadway_server_window_set_nodes (display->server, impl->id, impl->node_data);
-
-          _gdk_broadway_server_window_update (display->server,
-                                              impl->id,
-                                              texture_id);
-
-        }
-    }
-
-  /* We sync here to ensure all references to the impl->surface memory
-     is done, as we may later paint new data in them. */
-  if (updated_surface)
-    gdk_display_sync (GDK_DISPLAY (display));
-  else
-    gdk_display_flush (GDK_DISPLAY (display));
+  gdk_display_flush (GDK_DISPLAY (display));
 }
 
 static guint flush_id = 0;
@@ -360,8 +319,6 @@ _gdk_broadway_window_destroy (GdkWindow *window,
   g_hash_table_remove (broadway_display->id_ht, GINT_TO_POINTER (impl->id));
 
   _gdk_broadway_server_destroy_window (broadway_display->server, impl->id);
-  if (impl->texture_id)
-    gdk_broadway_server_release_texture (broadway_display->server, impl->texture_id);
 
 }
 
index 925efbf89e24f21dd347259d92c8678bab1e89b3..9e672f32a1d7a9eb396dc6d355fd150bb01484ea 100644 (file)
@@ -55,7 +55,6 @@ struct _GdkWindowImplBroadway
   GdkCursor *cursor;
 
   int id;
-  int texture_id;
 
   gboolean visible;
   gboolean maximized;